package cn.dakaqi.services.impl;

import cn.dakaqi.dao.PinganActivateDao;
import cn.dakaqi.entities.PinganActivate;
import cn.dakaqi.services.PinganActivateService;
import cn.dakaqi.utils.exception.ServiceRuntimeException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author chunyang on 2016/4/19.
 */
@Component(value = "pinganActivateService")
@Transactional
public class PinganActivateServiceImpl implements PinganActivateService
{
    @Autowired
    PinganActivateDao pinganActivateDao;
    @Override
    public void save(PinganActivate pinganActivate) throws ServiceRuntimeException
    {
        this.pinganActivateDao.save(pinganActivate);
    }

    @Override
    public PinganActivate findByCardNum(String cardNum)
    {
        return pinganActivateDao.findByCardNum(cardNum);
    }
}
